<template>
  <div class="fooball vtop">
    <div class="live-list" v-if="liveList.length!==0">
      <div class="live-item" v-for="(item, index) in liveList" :key="index">
        <div class="live-info">
          <div class="time">{{item.title}}</div>
          <div class="match-info">
            <div class="left">
              <img v-lazy="item.home_team_logo" alt="">
              <div class="desc">{{item.home_team_title}}</div>
            </div>
            <div class="center">
              <p>VS</p>
              <p v-if="['3'].includes(item.state)">{{item.home_team_score}}:{{item.guest_team_score}}</p>
              {{item.state_name}}
            </div>
            <div class="right">
              <img v-lazy="item.guest_team_logo" alt="">
              <div class="desc">{{item.guest_team_title}}</div>
            </div>
          </div>
        </div>
      </div>
      <!-- <div class="bottom-space" /> -->
    </div>
    <div class="no-attention" v-else>
      <img src="../../assets/imgs/icon-noattention@2x.png" alt="">
      <div class="desc">暂无比赛</div>
    </div>
  </div>
</template>
<script>
export default {
  props: ['liveList'],
  data () {
    return {
      // liveList: [{
      //   time: '周二 012 欧冠 11-07 04:00',
      //   left: {
      //     name: '贝利',
      //     logo: require('../../assets/imgs/live/belle.png')
      //   },
      //   right: {
      //     name: '福特利',
      //     logo: require('../../assets/imgs/live/cambridge.png')
      //   }
      // }, {
      //   time: '周二 012 欧冠 11-07 04:00',
      //   left: {
      //     name: '贝利',
      //     logo: require('../../assets/imgs/live/belle.png')
      //   },
      //   right: {
      //     name: '福特利',
      //     logo: require('../../assets/imgs/live/cambridge.png')
      //   }
      // }, {
      //   time: '周二 012 欧冠 11-07 04:00',
      //   left: {
      //     name: '贝利',
      //     logo: require('../../assets/imgs/live/belle.png')
      //   },
      //   right: {
      //     name: '福特利',
      //     logo: require('../../assets/imgs/live/cambridge.png')
      //   }
      // }, {
      //   time: '周二 012 欧冠 11-07 04:00',
      //   left: {
      //     name: '贝利',
      //     logo: require('../../assets/imgs/live/belle.png')
      //   },
      //   right: {
      //     name: '福特利',
      //     logo: require('../../assets/imgs/live/cambridge.png')
      //   }
      // }]
    }
  },
  methods: {
    // handleAttention (state) {
    //   state.isAtten = !state.isAtten;
    // }
  }
}
</script>
<style lang="less" scoped>
  @import '../../assets/styles/mixins.less';
  .fooball {
    background: #ffffff;
    .live-list {
      .live-item {
        display: flex;
        .live-info {
          position: relative;
          flex: 1;
          margin-left: 0.2rem;
          margin-right: 0.2rem;
          padding-top: 0.2rem;
          padding-bottom: 0.3rem;

          overflow: hidden;
          .border-1px-bottom(#d2d2d2);
          .time {
            font-size: 0.22rem;
            color: #999999;
            margin-bottom: 0.3rem;
            // line-height: 0.36rem;
          }
          .match-info {
            display: flex;
            justify-content: center;
            align-items: center;
            img {
              display: inline-block;
              width: 1rem;
              height: 1rem;
              margin-bottom: 0.2rem;
            }
            .desc {
              font-size: 0.26rem;
              color: #2b2b2b;
              text-align: center;
            }
            .left {
              width: 2rem;
              text-align: center;
            }
            .center {
              margin-left: 0.6rem;
              margin-right: 0.6rem;
              text-align: center;
              font-size: 0.3rem;
              color: #757575;
              p {
                margin-bottom: 0.2rem;
              }
            }
            .right {
              width: 2rem;
              text-align: center;
            }
          }
          .live-btn {
            position: absolute;
            right: 0.2rem;
            top: 50%;
            margin-top: -0.25rem;
            width: 1.13rem;
            height: 0.5rem;
            line-height: 0.5rem;
            font-size: 0.24rem;
            color: #ffffff;
            text-align: center;
            background-color: #d44743;
            border: 0.02rem solid #d44743;
            border-radius: 0.06rem;
            box-sizing: border-box;
            &.on {
              color: #d44743;
              background-color: #fff;
            }
          }
        }
        &:last-child {
          .live-info::after {
            display: none;
          }
        }
      }
      .bottom-space {
        height: 1rem; background: #f6f6f6;
      }
    }
    .no-attention {
      position: fixed;
      width: 100%;
      top: 1.92rem;
      bottom: 0;
      height: 100%;
      text-align: center;
      background: #ffffff;
      img {
        display: block;
        width: 4.15rem;
        height: 3.22rem;
        margin: 0 auto;
        padding-top: 0.8rem;
      }
      .desc {
        margin-top: 0.3rem;
        font-size: 0.22rem;
        color: #919191;
      }
    }
  }
</style>
